using System.Linq;
using System.IO;
using UnityEditor;

namespace  LS.Editor
{
    public class ConfigMenu
    {
        [MenuItem("Assets/Create/Lancer Studio/Empty Config CSV")]
        public static void CreateConfigAssets()
        {
            CreateCustomConfig("Config.csv");
        }
        
        public static void CreateCustomConfig(string fileName)
        {
            string[] _2 = new string[] { "Key", "", "Value" };
            string[] _3 = new string[] { "string", "", "string" };
            string[] _4 = new string[] { "键", "备注", "值" };

            string name = Path.GetFileNameWithoutExtension(fileName);
            ProjectWindowUtil.CreateAssetWithContent(fileName, CSVUtility.CombinBaseText(name, CSVUtility.Table, _2, _3, _4));
        }
    }
}
